﻿<phone:PhoneApplicationPage 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="WPSPU_Day2.SuperBallPage"
	FontFamily="{StaticResource PhoneFontFamilyNormal}"
	FontSize="{StaticResource PhoneFontSizeNormal}"
	Foreground="{StaticResource PhoneForegroundBrush}"
	Orientation="Portrait">
	<phone:PhoneApplicationPage.Resources>
		<Storyboard x:Name="MoveBallStoryboard" RepeatBehavior="Forever" AutoReverse="True">
			<DoubleAnimation Duration="0:0:1" To="300" Storyboard.TargetProperty="(Canvas.Left)" Storyboard.TargetName="ellipse" d:IsOptimized="True">
				<DoubleAnimation.EasingFunction>
					<BounceEase Bounciness="0.4" Bounces="4" EasingMode="EaseOut"/>
				</DoubleAnimation.EasingFunction>
			</DoubleAnimation>
			<ColorAnimation Duration="0:0:1" To="#FF0028CA" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="ellipse" d:IsOptimized="True"/>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="ellipse">
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<ElasticEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.5">
					<EasingDoubleKeyFrame.EasingFunction>
						<ElasticEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:3" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<ElasticEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="ellipse">
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<ElasticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.5">
					<EasingDoubleKeyFrame.EasingFunction>
						<ElasticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:3" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<ElasticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Canvas.Top)" Storyboard.TargetName="ellipse">
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:3" Value="616"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimation Duration="0:0:2" To="697.068" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="textBox" d:IsOptimized="True"/>
			<DoubleAnimation Duration="0:0:2" To="-68.404" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="textBox" d:IsOptimized="True"/>
			<DoubleAnimation Duration="0:0:1" To="360" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)" Storyboard.TargetName="path" d:IsOptimized="True"/>
		</Storyboard>
	</phone:PhoneApplicationPage.Resources>
	<phone:PhoneApplicationPage.ApplicationBar>
		<shell:ApplicationBar>
			<shell:ApplicationBarIconButton x:Name="beginStoryboard" IconUri="/icons/appbar.transport.play.rest.png" Text="begin" Click="beginStoryboard_Click"/>
		</shell:ApplicationBar>
	</phone:PhoneApplicationPage.ApplicationBar>
	<Canvas>
		<Ellipse x:Name="ellipse" Fill="White" 
		Height="150" 
		Stroke="Black" 
		Width="150" StrokeThickness="0" RenderTransformOrigin="1,0.45">
			<Ellipse.RenderTransform>
				<CompositeTransform/>
			</Ellipse.RenderTransform>
		</Ellipse>
		<TextBox x:Name="textBox" Height="97" Canvas.Left="-648" TextWrapping="Wrap" Text="TextBox" Canvas.Top="630" Width="414" RenderTransformOrigin="0.5,0.5">
			<TextBox.RenderTransform>
				<CompositeTransform/>
			</TextBox.RenderTransform>
		</TextBox>
		<Path x:Name="path" Data="M199.013,0 C218.06683,0 233.513,43.876099 233.513,98 C233.513,126.75333 229.15369,152.61444 222.21004,170.54138 L221.49738,172.29492 L224.14355,171.31784 C241.87808,165.07455 266.37808,161.21301 293.44003,161.21301 C347.56393,161.21301 391.44003,176.65919 391.44003,195.71301 C391.44003,214.76685 347.56393,230.21301 293.44003,230.21301 C266.37808,230.21301 241.87808,226.35147 224.14355,220.1082 L221.2229,219.02975 L222.21002,221.45865 C229.15369,239.38559 233.513,265.2467 233.513,294.00003 C233.513,348.12393 218.06683,392.00003 199.013,392.00003 C179.95918,392.00003 164.513,348.12393 164.513,294.00003 C164.513,262.81537 169.64073,235.0327 177.63179,217.08426 L178.40372,215.42776 L176.53087,216.35492 C158.65938,224.76764 130.13606,230.21301 97.999992,230.21301 C43.876083,230.21301 0,214.76685 0,195.71301 C0,176.65919 43.876083,161.21301 97.999992,161.21301 C130.13606,161.21301 158.65938,166.6584 176.53087,175.07112 L178.05603,175.82616 L177.63179,174.91577 C169.64073,156.96733 164.513,129.18466 164.513,98 C164.51302,43.876099 179.95918,0 199.013,0 z" Fill="{StaticResource BG_01}" Height="392" Canvas.Left="41.031" Stretch="Fill" Stroke="Black" StrokeThickness="0" Canvas.Top="78.515" UseLayoutRounding="False" Width="391.44" RenderTransformOrigin="0.5,0.5">
			<Path.RenderTransform>
				<CompositeTransform/>
			</Path.RenderTransform>
		</Path>
	</Canvas>

	<!--LayoutRoot is the root grid where all page content is placed-->
</phone:PhoneApplicationPage>